<%@ page language="java" import="java.util.*,entity.*,dao.*,dao.impl.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
request.setCharacterEncoding("GBK");
String uName = request.getParameter("uName");
String uPass = request.getParameter("uPass");
UserDao userDao = new UserDaoImpl();
User user = userDao.findUser(uName);

if(user!=null && user.getUPass().equals(uPass)){
	out.println("登录成功");
}else{
	out.println("登录失败");
}
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#apDiv1 {
	position: absolute;
	left: 1px;
	top: 1px;
	width: 800px;
	height: 50px;
	z-index: 1;
	text-align: center;
	font-weight: bold;
	font-size: 36px;
	color: #F00;
}
#apDiv2 {
	position: absolute;
	left: 1px;
	top: 51px;
	width: 800px;
	height: 25px;
	z-index: 2;
	font-size: 12px;
	background-color: #e0f0f9;
	color: #004c7d;
}
#apDiv3 {
	position: absolute;
	left: 1px;
	top: 76px;
	width: 800px;
	height: 500px;
	z-index: 3;
	color: #000;
	text-align: center;
}
#apDiv3 table tr td {
	font-size: 12px;
	color: #004c7d;
	text-align: left;
}

#apDiv3 table tr td.asd{
	text-align:right;
	font-size:14px;
}
</style>
</head>

<body>
<div id="apDiv1">校园BBS系统</div>
<div id="apDiv2">您尚未 <a href="login.jsp">登录</a>  | <a href="reg.jsp">注册</a></div>
<div id="apDiv3">
<form id="form1" name="form1" onSubmit="return check()" method="post" action="manage/doLogin.jsp">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="86" height="69"><a href=index.jsp>>>论坛首页</a></td>
      <td width="289">&nbsp;</td>
      <td width="180">&nbsp;</td>
      <td width="86">&nbsp;</td>
      <td width="159">&nbsp;</td>
    </tr>
    <tr>
      <td height="37">&nbsp;</td>
      <td class="asd">用户名：</td>
      <td><label for="textfield"></label>
        <input type="text" name="textfield" id="textfield" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="36">&nbsp;</td>
      <td class="asd">密码：</td>
      <td><label for="textfield2"></label>
        <input type="text" name="textfield2" id="textfield2" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="39">&nbsp;</td>
      <td class="asd">&nbsp;</td>
      <td><label for="textfield3">
        <input type="submit" name="button" id="button" value="登录" />
      </label></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="91">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
</div>
</body>
</html>
